using SheLife.Domain.Entities;

namespace SheLife.Domain.Interfaces.Repositories
{
    /// <summary>
    /// 系统登录日志仓储接口
    /// </summary>
    public interface ISystemLoginLogRepository : IRepository<SystemLoginLog>
    {
        Task<IEnumerable<SystemLoginLog>> GetByUserIdAsync(Guid userId);
        Task<IEnumerable<SystemLoginLog>> GetByUsernameAsync(string username);
        Task<IEnumerable<SystemLoginLog>> GetByIpAsync(string ip);
        Task<IEnumerable<SystemLoginLog>> GetByDateRangeAsync(DateTime startDate, DateTime endDate);
        Task<IEnumerable<SystemLoginLog>> GetByStatusAsync(bool success);
        Task<int> GetLoginCountByUserIdAsync(Guid userId, DateTime startDate, DateTime endDate);
        Task<SystemLoginLog> GetLastLoginByUserIdAsync(Guid userId);
    }
}